package com.curd.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@TableName("menu")
@Data
public class Menu implements Serializable{

    @ApiModelProperty("id")
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    private String name;
    private String path;
    private String icon;
    private String description;

    @TableField(exist = false)//在这里有，在数据库表里没有
    private List<Menu> children;

    private Integer pid;

    private String pagePath;
}
